package com.luxk.db.storage;

import com.luxk.db.common.ImpactException;

public interface StorageUnit {

	public void open() throws ImpactException;
	public void close() throws ImpactException;
	
	public int read(byte[] b, long offset, int length) throws ImpactException;
	public int write(byte[] b, long offset, int length) throws ImpactException;
	public Object readAsync(byte[] b, long offset, int length)
			throws ImpactException;
	public Object writeAsync(byte[] b, long offset, int length)
			throws ImpactException;
	public void sync();
	
	public String getName();
	public long size() throws ImpactException;
}
